<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>自定义事件</title>
  <script src="../vue.js"></script>
</head>
<body>
  <div id="app">
    <Child
      :obj="obj"
      @click="handleClick"
      @is-show="handleShowValue"
    ></Child>
    <!-- <button @click="handleClick">click</button> -->
  </div>
  <script type="module">
    import { Child } from './Child.js'
    new Vue({
      el: '#app',
      components: {
        Child
      },
      methods: {
        handleShowValue(value) {
          console.log(value)
        },
        handleClick() {
          console.log(1000)
        }
      },
      data: {
        obj: {
          x: 0, 
          y: 1,
          z: 2,
          w: 3
        }
      }
    })
  </script>
</body>
</html>